<!doctype html> 
<html ng-app='text'> 
<head> 
    <meta charset="utf-8"> 
    <title></title> 
    <script type="text/javascript" src='angular.js'></script>
    <script type="text/javascript">


    var app = angular.module('text',[]);
    app.controller('const',function ($scope){
    	//$scope.a = 30;
    	$scope.fn = function (){
    		$scope.$broadcast('testAdd',{x:20,b:30});
    	}
    });

    app.controller('const2',function ($scope){

    	$scope.$on('testAdd',function (event,date){
    		alert('接受成功')
    		console.log(date)
    	})
    	//alert($scope.a)
    });


    </script>
</head>
<body ng-controller='const'>
	<a href="javascript:;" ng-click='fn()'>发送</a>
	<div ng-controller='const2'></div>
</body>
</html>